<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/template.xhtml">
        
            <f:metadata>
                <f:event listener="#{usuarioController.getUsuario(sessionScope.user.id)}" type="preRenderComponent" id="fevent"/>
            </f:metadata> 
            <ui:define name="body">
                <h:form id="UsuarioViewForm">
                <p:panelGrid columns="2">
                    <p:outputLabel value="#{bundle.ViewUsuarioLabel_login}" for="login" />
                    <p:inputText id="login" value="#{sessionScope.user.login}"/>
                    <p:outputLabel value="#{bundle.ViewUsuarioLabel_funcao}" for="funcao" />
                    <p:selectOneListbox id="funcao" value="#{sessionScope.user.funcao}">
                        <f:selectItem itemLabel="Administrador" itemValue="Administrador" />
                        <f:selectItem itemLabel="Recepcionista" itemValue="Recepcionista" />
                    </p:selectOneListbox>                        
                </p:panelGrid>             
                </h:form>
            </ui:define>
        
    </ui:composition>

</html>

